Crate rustfmt_snippet

source ·
Expand description

Format given Rust code snippet with rustfmt

#Example

   let formated = rustfmt_snippet::rustfmt(
       r#"fn main() {
       }"#,
   )
   .unwrap();
   assert_eq!(formated, "fn main() {}\n");

Functions§